﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BookClubIt.bookclub
{
    public partial class delete : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {


            DTO.BookClub club = BookClubProcessorInstance.GetBookClubById(CID);
            var club_Name = club.Name;

            lblClubName.Text = club_Name;

        }

        protected void btnDeleteClub_Click(Object sender, EventArgs e)
        {
            if (BookClubProcessorInstance.IsLeader(CurrentUserId, CID))
            {
                BookClubProcessorInstance.DeleteBookClub(CID);
            }
        }
    }
}